<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>v-for指令</title>
    <script src="vue.js"></script>
   
</head>
<body>
    <div id="app">
       <table>
           <tr>
               <td>员工编号</td>
               <td>员工姓名</td>
               <td>员工职位</td>
               <td>入职日期</td>
           </tr>
           <tr v-for="emp in emps">
                <td>{{emp.empno}}</td>
                <td>{{emp.ename}}</td>
                <td>{{emp.job}}</td>
                <td>{{emp.hiredate}}</td>
           </tr>
       </table>
    </div>
</body>
</html>
<script>
    var vm=new Vue({
        el:'#app',
        data:{
            emps:[
                {empno:7369,ename:"SMITH",job:"SALESMAN",hiredate:"2008-09-08"},
                {empno:7368,ename:"WARD",job:"SALESMAN",hiredate:"2008-09-08"},
                {empno:7367,ename:"KING",job:"SALESMAN",hiredate:"2008-09-08"},
                {empno:7366,ename:"ALLEN",job:"SALESMAN",hiredate:"2008-09-08"},
                {empno:7365,ename:"SCOTT",job:"SALESMAN",hiredate:"2008-09-08"},
                {empno:7364,ename:"JAMES",job:"SALESMAN",hiredate:"2008-09-08"}
            ]
        }
       
    });
</script>